/**
 * 字符串循环移位 
 */
class Solution {
public:
    string getEncryptedString(string s, int k) {
        int n = s.length();
        string ans(n, ' ');
        for(int i=0;i<n;++i){
            ans[i] = s[(i+k)%n];
        }
        return ans;
    }
};